Integrand size = 24, antiderivative size = 148 \[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=-\frac {a \arctan \left (\frac {\sqrt [4]{b} \cos (c+d x)}{\sqrt {\sqrt {a}-\sqrt {b}}}\right )}{2 \sqrt {\sqrt {a}-\sqrt {b}} b^{7/4} d}+\frac {a \text {arctanh}\left (\frac {\sqrt [4]{b} \cos (c+d x)}{\sqrt {\sqrt {a}+\sqrt {b}}}\right )}{2 \sqrt {\sqrt {a}+\sqrt {b}} b^{7/4} d}+\frac {\cos (c+d x)}{b d}-\frac {\cos ^3(c+d x)}{3 b d} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3294, 1184, 1180, 211, 214} \[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=-\frac {a \arctan \left (\frac {\sqrt [4]{b} \cos (c+d x)}{\sqrt {\sqrt {a}-\sqrt {b}}}\right )}{2 b^{7/4} d \sqrt {\sqrt {a}-\sqrt {b}}}+\frac {a \text {arctanh}\left (\frac {\sqrt [4]{b} \cos (c+d x)}{\sqrt {\sqrt {a}+\sqrt {b}}}\right )}{2 b^{7/4} d \sqrt {\sqrt {a}+\sqrt {b}}}-\frac {\cos ^3(c+d x)}{3 b d}+\frac {\cos (c+d x)}{b d} \]
[In]
[Out]
Rule 211
Rule 214
Rule 1180
Rule 1184
Rule 3294
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^3}{a-b+2 b x^2-b x^4} \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {\text {Subst}\left (\int \left (-\frac {1}{b}+\frac {x^2}{b}+\frac {a-a x^2}{b \left (a-b+2 b x^2-b x^4\right )}\right ) \, dx,x,\cos (c+d x)\right )}{d} \\ & = \frac {\cos (c+d x)}{b d}-\frac {\cos ^3(c+d x)}{3 b d}-\frac {\text {Subst}\left (\int \frac {a-a x^2}{a-b+2 b x^2-b x^4} \, dx,x,\cos (c+d x)\right )}{b d} \\ & = \frac {\cos (c+d x)}{b d}-\frac {\cos ^3(c+d x)}{3 b d}+\frac {a \text {Subst}\left (\int \frac {1}{-\sqrt {a} \sqrt {b}+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 b d}+\frac {a \text {Subst}\left (\int \frac {1}{\sqrt {a} \sqrt {b}+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 b d} \\ & = -\frac {a \arctan \left (\frac {\sqrt [4]{b} \cos (c+d x)}{\sqrt {\sqrt {a}-\sqrt {b}}}\right )}{2 \sqrt {\sqrt {a}-\sqrt {b}} b^{7/4} d}+\frac {a \text {arctanh}\left (\frac {\sqrt [4]{b} \cos (c+d x)}{\sqrt {\sqrt {a}+\sqrt {b}}}\right )}{2 \sqrt {\sqrt {a}+\sqrt {b}} b^{7/4} d}+\frac {\cos (c+d x)}{b d}-\frac {\cos ^3(c+d x)}{3 b d} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 1.30 (sec) , antiderivative size = 310, normalized size of antiderivative = 2.09 \[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {18 \cos (c+d x)-2 \cos (3 (c+d x))-3 i a \text {RootSum}\left [b-4 b \text {$\#$1}^2-16 a \text {$\#$1}^4+6 b \text {$\#$1}^4-4 b \text {$\#$1}^6+b \text {$\#$1}^8\&,\frac {-2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )+i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )+6 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2-3 i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2-6 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^4+3 i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^4+2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^6-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^6}{-b \text {$\#$1}-8 a \text {$\#$1}^3+3 b \text {$\#$1}^3-3 b \text {$\#$1}^5+b \text {$\#$1}^7}\&\right ]}{24 b d} \]
[In]
[Out]
Time = 1.72 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.74
method | result | size |
derivativedivides | \(\frac {-\frac {\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}-\cos \left (d x +c \right )}{b}-a \left (\frac {\arctan \left (\frac {\cos \left (d x +c \right ) b}{\sqrt {\left (\sqrt {a b}-b \right ) b}}\right )}{2 b \sqrt {\left (\sqrt {a b}-b \right ) b}}-\frac {\operatorname {arctanh}\left (\frac {\cos \left (d x +c \right ) b}{\sqrt {\left (\sqrt {a b}+b \right ) b}}\right )}{2 b \sqrt {\left (\sqrt {a b}+b \right ) b}}\right )}{d}\) | \(110\) |
default | \(\frac {-\frac {\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}-\cos \left (d x +c \right )}{b}-a \left (\frac {\arctan \left (\frac {\cos \left (d x +c \right ) b}{\sqrt {\left (\sqrt {a b}-b \right ) b}}\right )}{2 b \sqrt {\left (\sqrt {a b}-b \right ) b}}-\frac {\operatorname {arctanh}\left (\frac {\cos \left (d x +c \right ) b}{\sqrt {\left (\sqrt {a b}+b \right ) b}}\right )}{2 b \sqrt {\left (\sqrt {a b}+b \right ) b}}\right )}{d}\) | \(110\) |
risch | \(\frac {3 \,{\mathrm e}^{i \left (d x +c \right )}}{8 b d}+\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )}}{8 b d}+\frac {i \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (a \,b^{7} d^{4}-b^{8} d^{4}\right ) \textit {\_Z}^{4}-2048 a^{2} b^{4} d^{2} \textit {\_Z}^{2}-1048576 a^{4}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\left (\left (-\frac {i b^{5} d^{3}}{16384 a^{2}}+\frac {i b^{6} d^{3}}{16384 a^{3}}\right ) \textit {\_R}^{3}+\frac {i d \,b^{2} \textit {\_R}}{8 a}\right ) {\mathrm e}^{i \left (d x +c \right )}+1\right )\right )}{128}-\frac {\cos \left (3 d x +3 c \right )}{12 b d}\) | \(166\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 849 vs. \(2 (110) = 220\).
Time = 0.34 (sec) , antiderivative size = 849, normalized size of antiderivative = 5.74 \[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {3 \, b d \sqrt {-\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} + a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}} \log \left (a^{3} \cos \left (d x + c\right ) + {\left (a^{2} b^{2} d - {\left (a b^{5} - b^{6}\right )} d^{3} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}}\right )} \sqrt {-\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} + a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}}\right ) - 3 \, b d \sqrt {\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} - a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}} \log \left (a^{3} \cos \left (d x + c\right ) - {\left (a^{2} b^{2} d + {\left (a b^{5} - b^{6}\right )} d^{3} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}}\right )} \sqrt {\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} - a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}}\right ) - 3 \, b d \sqrt {-\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} + a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}} \log \left (-a^{3} \cos \left (d x + c\right ) + {\left (a^{2} b^{2} d - {\left (a b^{5} - b^{6}\right )} d^{3} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}}\right )} \sqrt {-\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} + a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}}\right ) + 3 \, b d \sqrt {\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} - a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}} \log \left (-a^{3} \cos \left (d x + c\right ) - {\left (a^{2} b^{2} d + {\left (a b^{5} - b^{6}\right )} d^{3} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}}\right )} \sqrt {\frac {{\left (a b^{3} - b^{4}\right )} d^{2} \sqrt {\frac {a^{5}}{{\left (a^{2} b^{7} - 2 \, a b^{8} + b^{9}\right )} d^{4}}} - a^{2}}{{\left (a b^{3} - b^{4}\right )} d^{2}}}\right ) - 4 \, \cos \left (d x + c\right )^{3} + 12 \, \cos \left (d x + c\right )}{12 \, b d} \]
[In]
[Out]
Timed out. \[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\int { -\frac {\sin \left (d x + c\right )^{7}}{b \sin \left (d x + c\right )^{4} - a} \,d x } \]
[In]
[Out]
\[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\int { -\frac {\sin \left (d x + c\right )^{7}}{b \sin \left (d x + c\right )^{4} - a} \,d x } \]
[In]
[Out]
Time = 13.80 (sec) , antiderivative size = 1119, normalized size of antiderivative = 7.56 \[ \int \frac {\sin ^7(c+d x)}{a-b \sin ^4(c+d x)} \, dx=\frac {\cos \left (c+d\,x\right )}{b\,d}-\frac {{\cos \left (c+d\,x\right )}^3}{3\,b\,d}+\frac {\mathrm {atan}\left (-\frac {a^3\,\cos \left (c+d\,x\right )\,\sqrt {-\frac {\sqrt {a^5\,b^7}}{16\,\left (a\,b^7-b^8\right )}-\frac {a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,8{}\mathrm {i}}{\frac {2\,a^4}{b^2}+\frac {2\,a^4\,b^6}{a\,b^7-b^8}+\frac {2\,a^2\,b^2\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}}+\frac {a^3\,b^8\,\cos \left (c+d\,x\right )\,\sqrt {-\frac {\sqrt {a^5\,b^7}}{16\,\left (a\,b^7-b^8\right )}-\frac {a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,8{}\mathrm {i}}{2\,a^4\,b^6-2\,a^5\,b^5+\frac {2\,a^4\,b^{14}}{a\,b^7-b^8}-\frac {2\,a^5\,b^{13}}{a\,b^7-b^8}+\frac {2\,a^2\,b^{10}\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}-\frac {2\,a^3\,b^9\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}}+\frac {a\,b^4\,\cos \left (c+d\,x\right )\,\sqrt {-\frac {\sqrt {a^5\,b^7}}{16\,\left (a\,b^7-b^8\right )}-\frac {a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,\sqrt {a^5\,b^7}\,8{}\mathrm {i}}{2\,a^4\,b^6-2\,a^5\,b^5+\frac {2\,a^4\,b^{14}}{a\,b^7-b^8}-\frac {2\,a^5\,b^{13}}{a\,b^7-b^8}+\frac {2\,a^2\,b^{10}\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}-\frac {2\,a^3\,b^9\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}}\right )\,\sqrt {-\frac {\sqrt {a^5\,b^7}+a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,2{}\mathrm {i}}{d}-\frac {\mathrm {atan}\left (\frac {a^3\,\cos \left (c+d\,x\right )\,\sqrt {\frac {\sqrt {a^5\,b^7}}{16\,\left (a\,b^7-b^8\right )}-\frac {a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,8{}\mathrm {i}}{\frac {2\,a^4}{b^2}+\frac {2\,a^4\,b^6}{a\,b^7-b^8}-\frac {2\,a^2\,b^2\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}}-\frac {a^3\,b^8\,\cos \left (c+d\,x\right )\,\sqrt {\frac {\sqrt {a^5\,b^7}}{16\,\left (a\,b^7-b^8\right )}-\frac {a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,8{}\mathrm {i}}{2\,a^4\,b^6-2\,a^5\,b^5+\frac {2\,a^4\,b^{14}}{a\,b^7-b^8}-\frac {2\,a^5\,b^{13}}{a\,b^7-b^8}-\frac {2\,a^2\,b^{10}\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}+\frac {2\,a^3\,b^9\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}}+\frac {a\,b^4\,\cos \left (c+d\,x\right )\,\sqrt {\frac {\sqrt {a^5\,b^7}}{16\,\left (a\,b^7-b^8\right )}-\frac {a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,\sqrt {a^5\,b^7}\,8{}\mathrm {i}}{2\,a^4\,b^6-2\,a^5\,b^5+\frac {2\,a^4\,b^{14}}{a\,b^7-b^8}-\frac {2\,a^5\,b^{13}}{a\,b^7-b^8}-\frac {2\,a^2\,b^{10}\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}+\frac {2\,a^3\,b^9\,\sqrt {a^5\,b^7}}{a\,b^7-b^8}}\right )\,\sqrt {\frac {\sqrt {a^5\,b^7}-a^2\,b^4}{16\,\left (a\,b^7-b^8\right )}}\,2{}\mathrm {i}}{d} \]
[In]
[Out]